Author: Ruslan Zhovtonoga
Posted: 9/11/2009 2:15:46 PM
Let’s assume that we have the following list of the menu items available for selecting:
What should we do if the user should be able to select only subitems of the “available metals“ and “years” items?
(especially in case the “aluminium” and “2011” items should be hidden)
The source parameter of a TreeLlist field “understands” the following list of additional parameters:
- DataSource: Root item.
- DatabaseName: The name of the database containing DataSource.
- IncludeTemplatesForSelection: Users can only select items based on this comma-separated list of data template names.
- ExcludeTemplatesForSelection: Users cannot select items based on this comma-separated list of data template names.
- IncludeTemplatesForDisplay: Users can navigate items based on this comma-separated list of data template name and IDs.
- ExcludeTemplatesForDisplay: Users cannot navigate items based on this comma-separated list of data template names and IDs.
- IncludeItemsForDisplay: Users can navigate items based on this comma-separated list of item names and IDs.
- ExcludeItemsForDisplay: Users cannot navigate items based on this comma-separated list of item names and IDs.
- AllowMultipleSelection: If yes, users can select the same item more than once.
Those parameters can help to organize a TreeList data especially for the current needs.
The following TreeList field source value produces the needed result:
You can use similar approach especially for your purposes i.e. add additional or remove existing items for the TreeList data using the IncludeItemsForDisplay and ExcludeItemsForDisplay parameters.
Please notice that items within the source string should be comma separated and can be defined by their names or GUIDs.
Example:
Prev Next